.PHONY:clean test
target = ./lib/libtdpool.so
src = ./src/ThreadPool.c
requests = $(patsubst %.c, %.o, $(src))
inc = ./inc

$(target):$(requests)
	g++ -shared -o $@ $<

$(requests): %.o: %.c
	g++ -c $< -o $@ -fPIC -I$(inc)

test:
	g++ -o ./a.out ./src/test.c $(target) -ltdpool -lpthread -L./lib -I$(inc)

clean:
	rm -rf $(requests) $(target) a.out